<div>
    <h2 data-translate="milkbeeApp.card.home.title">Cards</h2>
    <jhi-alert></jhi-alert>
    <br/>
    <div class="table-responsive">
        <table class="jh-table table table-striped">
            <thead>
                <tr jh-sort="vm.predicate" ascending="vm.reverse" callback="vm.transition()">
                    <th jh-sort-by="title"><span data-translate="milkbeeApp.card.title">Title</span> <span class="glyphicon glyphicon-sort"></span></th>
                    <th jh-sort-by="createdAt"><span data-translate="milkbeeApp.card.createdAt">Created At</span> <span class="glyphicon glyphicon-sort"></span></th>
                    <th jh-sort-by="commentCount"><span data-translate="milkbeeApp.card.commentCount">Comment Count</span> <span class="glyphicon glyphicon-sort"></span></th>
                    <th jh-sort-by="attachment"><span data-translate="milkbeeApp.card.attachment">Attachment</span> <span class="glyphicon glyphicon-sort"></span></th>
                    <th jh-sort-by="accusation"><span data-translate="milkbeeApp.card.accusation">Accusation</span> <span class="glyphicon glyphicon-sort"></span></th>
                    <th jh-sort-by="look"><span data-translate="milkbeeApp.card.look">Look</span> <span class="glyphicon glyphicon-sort"></span></th>
                    <th jh-sort-by="download"><span data-translate="milkbeeApp.card.download">Download</span> <span class="glyphicon glyphicon-sort"></span></th>
                    <th jh-sort-by="light"><span data-translate="milkbeeApp.card.light">Light</span> <span class="glyphicon glyphicon-sort"></span></th>
                    <th jh-sort-by="essence"><span data-translate="milkbeeApp.card.essence">Essence</span> <span class="glyphicon glyphicon-sort"></span></th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="card in vm.cards track by card.id">
                    <td><a ui-sref="pubcardcoments({cardId:card.id,cardTitle:card.title})" >{{card.title}}</a></td>
                    <td>{{card.createdAt | date:'medium'}}</td>
                    <td>{{card.commentCount}}</td>
                    <td>{{card.attachment}}</td>
                    <td>{{card.accusation}}</td>
                    <td>{{card.look}}</td>
                    <td>{{card.download}}</td>
                    <td>{{card.light}}</td>
                    <td>
                    	<span ng-if="card.essence>2" class="glyphicon glyphicon-ok" style="color:green;"></span>
                    	<span ng-if="card.essence==1" class="glyphicon glyphicon-ban-circle" style="color:gray;"></span>
                    	<span ng-if="card.essence==2" class="glyphicon glyphicon-ok" style="color:gray;"></span>
                    </td>
                    <td class="text-right">
                        <div class="btn-group flex-btn-group-container">
                            <button ng-if="card.essence<1" type="submit"
                                    ng-click="vm.applyessence({id:card.id})"
                                    class="btn btn-info btn-sm">
                                <span class="glyphicon glyphicon-chevron-up"></span>
                                <span class="hidden-xs hidden-sm" data-translate="entity.action.applyessence"></span>
                            </button>
                            <button type="submit"
                                    ui-sref="card.delete({id:card.id})"
                                    class="btn btn-danger btn-sm">
                                <span class="glyphicon glyphicon-remove-circle"></span>
                                <span class="hidden-xs hidden-sm" data-translate="entity.action.delete"></span>
                            </button>
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <div class="text-center">
        <jhi-item-count page="vm.page" total="vm.queryCount" items-per-page="vm.itemsPerPage"></jhi-item-count>
        <uib-pagination class="pagination-sm" total-items="vm.totalItems" items-per-page="vm.itemsPerPage" ng-model="vm.page" ng-change="vm.transition()"></uib-pagination>
    </div>
</div>
